//
//  NDCustomAlert.h
//  PDF
//
//  Created by 刘星辰 on 2017/3/29.
//  Copyright © 2017年 刘星辰. All rights reserved.
//

#import "DQAlertView.h"

/** 弹框默认宽 */
extern CGFloat const customAlertfaultWidth;

typedef void(^__LeftBlock)(void);
typedef void(^__RightBlock)(void);
typedef void(^__TimeOutBlock)(void);

@interface CustomAlert : DQAlertView

@property (nonatomic,copy)__LeftBlock leftBlock;
@property (nonatomic,copy)__RightBlock rightBlock;
@property (nonatomic,copy)__TimeOutBlock timeOutBlock;

/**
 定制自定义显示弹窗 ps:按钮数量 0-2 根据传入的按钮title是否为nil决定
 
 @param customView 自定义视图
 @param leftButtonTitle 左按钮 颜色默认黑色
 @param rightButtonTitle 右按钮 颜色默认主题色
 @param leftBlock 左按钮block
 @param rightBlock 右按钮block
 @return 类方法
 */
+(instancetype)makeAlertWithCustomView:(UIView *)customView
                        leftButtonTitle:(NSString *)leftButtonTitle
                       rightButtonTitle:(NSString *)rightButtonTitle
                              leftBlock:(void (^)(void))leftBlock
                             rightBolck:(void (^)(void))rightBlock;
/**
 定制自定义显示弹窗 ps:按钮数量 0-2 根据传入的按钮title是否为nil决定
 
 @param customView 自定义视图
 @param leftButtonTitle 左按钮 颜色默认黑色
 @param rightButtonTitle 右按钮 颜色默认主题色
 @param leftBlock 左按钮block
 @param rightBlock 右按钮block
 @return 对象方法
 */
-(instancetype)initWithCustomView:(UIView *)customView
             leftButtonTitle:(NSString *)leftButtonTitle
            rightButtonTitle:(NSString *)rightButtonTitle
                   leftBlock:(void (^)(void))leftBlock
                  rightBolck:(void (^)(void))rightBlock;

/**
 定制自定义显示弹窗
 @param customView 自定义视图
 */
- (instancetype)initWithCustomView:(UIView *)customView;


/**
 创建带定时器的弹窗

 @param second 倒计时时间
 @param block 弹窗消失会做的事
 */
- (void)countDownSecond:(CGFloat)second timeOutBlock:(__TimeOutBlock)block;

@end
